package dfbz.线程唤醒;

import dfbz.线程通信.Shower;

public class Test {
    public static void main(String[] args) {
        Shower shower = new Shower();
        new Thread(){
            @Override
            public void run() {
                try {
                    shower.shower1();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }.start();
        new Thread(){
            @Override
            public void run() {
                try {
                    shower.shower2();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }.start();
        new Thread(){
            @Override
            public void run() {
                try {
                    shower.shower3();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }.start();
    }
}
